What is a Language Model?
A language model reads some text and predicts what comes next. Unlike image models that output a class label (e.g., "Cat" or "Dog"), a language model outputs the most probable next piece of text.
The Core Concept
A language model maps a sequence of inputs to a single output prediction:
- Input Prompt:
The capital of France is - Likely Next Token:
Paris
If we repeat this prediction step many times—taking the new word, adding it to the input, and predicting again—the model can produce a whole sentence or paragraph.
This simple iterative process is the foundational idea behind all modern conversational chatbots and text generators, from miniature models to massive industry LLMs.